<template>
  <div>
    <div class='item border-bottom' v-for='(item,index) of list' :key='index'>
      <span class='item-title-icon'></span>
      {{ item.title }}
      <div class="item-children" v-if='item.children'>
        <detail-list :list='item.children'></detail-list>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}

</script>
<style lang='stylus' scoped>
.item {
  position: relative;
  line-height: .5rem;
  font-size: .32rem;
  padding: .1rem .6rem;
}

.item-title-icon {
  display: inline-block;
  position: absolute;
  top: .2rem;
  left: .2rem;
  width: .36rem;
  height: .36rem;
  background: url('http://s.qunarzz.com/piao/image/touch/sight/detail.png') 0 -.45rem no-repeat;
  background-size: .4rem 3rem;
}

</style>
